#include "Metgine/Core/Object.hpp"
#include "Metgine/Core/Log.hpp"
#include "Metgine/Core/World.hpp"
#include "Metgine/Core/Game.hpp"

namespace Metgine
{

namespace Core
{

Object::Object(Object* creator, ObjectType::ObjectType type)
{
    m_owner = creator;
    m_type = type;
    m_alive = true;
}

void Object::BuildPhysBody()
{
    // Do nothing by default
}

void Object::Update(float frametime)
{
    // Do nothing by default
}

void Object::Render()
{
    // Do nothing by default (Not all objects have a sprite to render)
}

void Object::SetOwner(Object* owner)
{
    m_owner = owner;
}

std::string ObjectTypeToString(sf::Uint32 type)
{
    switch(type)
    {
        case ObjectType::Player:
            return "Player";
        case ObjectType::Monster:
            return "Monster";
        case ObjectType::Projectile:
            return "Projectile";
        case ObjectType::Pickup:
            return "Pickup";
        default:
            return "Unknown";
    }
}

}; // Core
}; // Metgine
